package com.example.forumsystem.demos.web.service;

import com.example.forumsystem.demos.web.model.MessageInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public interface IMessageService {
    void create(MessageInfo message);

    Integer selectUnreadCount(Long id);

    List<MessageInfo> selectByReceiveUserId(Long receiveUserId);

    MessageInfo selectById(Long id);

    void updateStateById(Long id, Byte state);
    @Transactional
    void reply(Long repliedId, MessageInfo message);
}
